gtk_selection_model_unselect_range
gtk_selection_model_select_all
gtk_selection_model_unselect_all
+GtkSelectionCallback
+gtk_selection_model_select_callback
+gtk_selection_model_unselect_callback
gtk_selection_model_query_range
<SUBSECTION>
gtk_selection_model_selection_changed
return iface->unselect_all (model);
}
+/**
+ * gtk_selection_model_select_callback:
+ * @model: a #GtkSelectionModel
+ * @callback: a #GtkSelectionCallback to determine items to select
+ * @data: data to pass to @callback
+ *
+ * Requests to select all items for which @callback returns
+ * @selected as TRUE.
+ */
gboolean
gtk_selection_model_select_callback (GtkSelectionModel *model,
GtkSelectionCallback callback,
return GTK_SELECTION_MODEL_GET_IFACE (model)->select_callback (model, callback, data);
}
+/**
+ * gtk_selection_model_unselect_callback:
+ * @model: a #GtkSelectionModel
+ * @callback: a #GtkSelectionCallback to determine items to select
+ * @data: data to pass to @callback
+ *
+ * Requests to unselect all items for which @callback returns
+ * @selected as TRUE.
+ */
gboolean
gtk_selection_model_unselect_callback (GtkSelectionModel *model,
GtkSelectionCallback callback,
GDK_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE (GtkSelectionModel, gtk_selection_model, GTK, SELECTION_MODEL, GListModel)
+/**
+ * GtkSelectionCallback:
+ * @position: the position to query
+ * @start_range: (out): returns the position of the first element of the range
+ * @n_items: (out): returns the size of the range
+ * @selected: (out): returns whether items in @range are selected
+ * @data: callback data
+ *
+ * Callback type for determining items to operate on with
+ * gtk_selection_model_select_callback() or
+ * gtk_selection_model_unselect_callback().
+ *
+ * The callback determines a range of consecutive items around
+ * @position which should either all
+ * be changed, in which case @selected is set to %TRUE, or all not
+ * be changed, in which case @selected is set to %FALSE.
+ *
+ * @start_range and @n_items are set to return the range.
+ */
typedef void (* GtkSelectionCallback) (guint position,
guint *start_range,
guint *n_items,